package org.itew.mymapreduce.test.randomfile.sort;

public class Data implements Comparable<Data> {

	public int key;
	public double value;
	
	public Data(int key,double value){
		this.key = key;
		this.value = value;
	}

	@Override
	public int compareTo(Data o) {
		return key > o.key ? 1 : key < o.key ? -1 : value > o.value ? 1 :value<o.value ? -1 : 0;
	}

	@Override
	public String toString() {
		return key+"\t"+value;
	}
	
}
